package Work;
public class Work2 {
    public static void main(String[] args) {
        Specialist s = new Specialist("凌然",16819201);
        s.skill();
        Doctor  d = new NotSpecialist("小明",123456789);
        d.still();
    }
}
class Doctor {
    private String name;
    private int idnumder;
    private String craft = "看病";
    public Doctor(String name,int idnumder) {      // 注意：构造方法没有返回值的
        this.name = name;
        this.idnumder = idnumder;
    }
    public void still() {
        System.out.println(this.craft);
    }
    public String getCraft() {
        return this.craft;
    }
    public String getName() {
        return name;
    }
    public int getIdnumder() {
        return idnumder;
    }
}

class Specialist extends Doctor {
    private String skill01 = "徒手止血";
    private String skill02 = "肌腱缝合";
    public Specialist(String name, int idnumder) {
        super(name,idnumder);
    }

    public void skill() {
        System.out.println("姓名:"+super.getName()+"编号:"+super.getIdnumder());
        System.out.println("基本技能:"+super.getCraft()+":技能一:"+this.skill01+":技能二:"
                +this.skill02);
    }
}

class NotSpecialist extends Doctor {
    private String still01 = "基本外伤缝合";
    private String still02 = "解决轻度骨折，轻度扭伤";

    public NotSpecialist(String name,int idnumderr) {
        super(name,idnumderr);

    }
    public void still() {
        System.out.println("姓名:"+super.getName()+"编号:"+super.getIdnumder());
        System.out.println("基本技能:"+super.getCraft()+":技能一:"+this.still01+":技能二:"+
                this.still02);
    }

}



